package com.lhl.biz.template.api.shared.exception;

import com.lhl.fw.core.exception.BizException;
import com.lhl.fw.core.exception.CommonErrorCode;

/**
 * @className: TemplateException
 * @description: 业务异常类
 * @author: king
 * @date: 2020-06-17 10:18
 **/
public final class TemplateException extends BizException {
    /**
     * 错误码
     */
    private final String code;

    public TemplateException(CommonErrorCode bizErrorCode) {
        super(bizErrorCode);
        // 设置错误码
        this.code = bizErrorCode.getCode();
    }
    public String getCode() {
        return code;
    }
}